<?php
require_once 'BaseController.php';

/**
 * 店舗詳細コントローラクラス<br />
 *
 * @package apamanshop
 * @author　
 * @copyright　
 */
class Shop_BlogController extends Shop_BaseController
{
	/**
	 * メインアクション
	 *
     * @access public
     * @return void
	 */
	public function indexAction()
	{
        // 利用ｻｲﾄ区分
        if (empty($this->_params['UseKbn']))
        {
        	$this->_params['UseKbn'] = '0';
        }

		$OemCd = $this->getParamValue('OemCd');
		if ($OemCd == '') $OemCd = null;

		$this->setXPassThroutgh();
        $this->_remove_place_folder = true;

        $shopCd = $this->getParamValue('ShopCd');

        // 店舗コードが存在しない場合
        if (is_null($shopCd))
        {
        	$this->getResponse()->setRawHeader('HTTP/1.1 404 Not Found')->sendResponse();
        	exit;
        }
        $this->_params['ShopCd'] = $shopCd;
        // 店舗詳細情報取得
        $this->_model = new Shop_Model_Detail();
        $shopDtlList = $this->_model->getList($this->_params);
        // 店舗が存在しない場合
        if (count($shopDtlList) == 0)
        {
        	$this->getResponse()->setRawHeader('HTTP/1.1 404 Not Found')->sendResponse();
        	exit;
        }

        // 表示用に変換
        $this->_data['shopDtl'] = $this->_model->convertData($shopDtlList[0], $this->_apalogurl, $this->_tenpoimageurl);
		$this->_data['shopDtl']['apalogH2Flg'] = true;

        // メイン
        $this->_main_helper = $this->_apalog_helper;
	}
}
?>
